﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data.SqlClient;


public partial class bb_添加车主信息 : System.Web.UI.Page
{
    private static string sqlstring = System.Configuration.ConfigurationManager.AppSettings["strConn"].ToString().Trim();
    protected void Page_Load(object sender, EventArgs e)
    {

    }
    protected void Button1_Click(object sender, EventArgs e)
    {
        string id = txtid.Text.Trim();
        string name = txtname.Text.Trim();
        string sex = txtsex.Text.Trim();
        string phone = txtphone.Text.Trim();
        string home = txthome.Text.Trim();
        users us = new users();
        us.id = id;
        us.name = name;
        us.phone = phone;
        us.sex = sex;
        us.home = home;
        int result = us.add1(us);
        if (result > 0)
        {
            Response.Write("<script >alert(\"添加信息成功!\")</script>");

        }
        else
        {

            Response.Write("<script >alert(\"对不起！添加失败!\")</script>");
        }

    }
}